<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>sipML5: tsip_session_invite Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="sipml-45x51.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">sipML5
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">World&#39;s first open source HTML5 SIP Client</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">tsip_session_invite Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="classtsip__session__invite-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad850142694c7a2a99a147384acdba251"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#ad850142694c7a2a99a147384acdba251">tsip_session_invite</a> (<a class="el" href="classtsip__stack.html">tsip_stack</a> o_stack)</td></tr>
<tr class="memitem:ab412ae639f3f61e967ea0a5fbe92fd92"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#ab412ae639f3f61e967ea0a5fbe92fd92">info</a> (Object o_content, String s_content_type)</td></tr>
<tr class="memitem:abecaa4ce5c90c9e864346dea92463d07"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#abecaa4ce5c90c9e864346dea92463d07">resume</a> (tmedia_type_e e_media_type)</td></tr>
<tr class="memitem:adbbf5afe6c537d00058bff5a8e24b219"><td class="memItemLeft" align="right" valign="top">objectURL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#adbbf5afe6c537d00058bff5a8e24b219">get_url_video_local</a> ()</td></tr>
<tr class="memitem:a7d815dd443104fdf8f78c6fce6d83c55"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#a7d815dd443104fdf8f78c6fce6d83c55">dtmf</a> (char c_digit)</td></tr>
<tr class="memitem:ae4f1c4a18f2a2189906839ee458066a0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#ae4f1c4a18f2a2189906839ee458066a0">hold</a> (tmedia_type_e e_media_type)</td></tr>
<tr class="memitem:ac69f7ba9066a39841de862bc8b1aab7c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#ac69f7ba9066a39841de862bc8b1aab7c">call</a> (tmedia_type_e e_media_type)</td></tr>
<tr class="memitem:acc1077380a35ad17e3fed88fa2cbfcfa"><td class="memItemLeft" align="right" valign="top">objectURL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtsip__session__invite.html#acc1077380a35ad17e3fed88fa2cbfcfa">get_url_video_remote</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>SIP <b>INVITE</b> session </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad850142694c7a2a99a147384acdba251"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classtsip__session__invite.html#ad850142694c7a2a99a147384acdba251">tsip_session_invite::tsip_session_invite</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classtsip__stack.html">tsip_stack</a>&#160;</td>
          <td class="paramname"><em>o_stack</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Signature: <a class="el" href="classtsip__session__invite.html">tsip_session_invite</a>(o_stack, ...set()) </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">o_stack</td><td>SIP stack to use to create the session</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><pre class="fragment"><span class="comment">// creates a session to call &#39;alice&#39;</span>
var o_session = <span class="keyword">new</span> <a class="code" href="classtsip__session__invite.html#ad850142694c7a2a99a147384acdba251">tsip_session_invite</a>(o_stack,
    <a class="code" href="classtsip__session.html">tsip_session</a>.prototype.<a class="code" href="classtsip__session.html#a80b77bc8b2094ca9a496b94a6e2c2c14">SetToStr</a>(<span class="stringliteral">&quot;alice&quot;</span>),
    <a class="code" href="classtsip__session.html">tsip_session</a>.prototype.<a class="code" href="classtsip__session.html#adb956d8b658d6606931a0755109f1079">SetCaps</a>(<span class="stringliteral">&quot;+sip.ice&quot;</span>),
    <a class="code" href="classtsip__session.html">tsip_session</a>.prototype.<a class="code" href="classtsip__session.html#a827acf39b9d9cbb6a057e23af7b2c402">SetHeader</a>(<span class="stringliteral">&quot;Purpose&quot;</span>, <span class="stringliteral">&quot;Calling &#39;alice&#39;&quot;</span>)
);
</pre></div> 
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac69f7ba9066a39841de862bc8b1aab7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classtsip__session__invite.html#ac69f7ba9066a39841de862bc8b1aab7c">tsip_session_invite::call</a> </td>
          <td>(</td>
          <td class="paramtype">tmedia_type_e&#160;</td>
          <td class="paramname"><em>e_media_type</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Makes and audio/video call.<br/>
 Sends SIP <b>INVITE</b> request.<br/>
 The session state will be reported through <a class="el" href="classtsip__stack.html#aae58d97571234f488efab116a83db829">tsip_stack::on_event_dialog</a> and <a class="el" href="classtsip__stack.html#a9b0aa5e2c48c1aaf3d44dbb7000f2ef8">tsip_stack::on_event_invite</a>.</p>
<p>Signature: call(e_media_type, ...set()) </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">e_media_type</td><td>media type. For now, only tmedia_type_e.AUDIO and tmedia_type_e.AUDIO_VIDEO are supported. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>zero if succeed and non-zero otherwise </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="classtsip__session__invite.html#ae4f1c4a18f2a2189906839ee458066a0">hold()</a> <br/>
 <a class="el" href="classtsip__session__invite.html#abecaa4ce5c90c9e864346dea92463d07">resume()</a></dd></dl>
<div class="fragment"><pre class="fragment">o_session.call(tmedia_type_e.AUDIO_VIDEO,
    <a class="code" href="classtsip__session.html">tsip_session</a>.prototype.<a class="code" href="classtsip__session.html#a827acf39b9d9cbb6a057e23af7b2c402">SetHeader</a>(<span class="stringliteral">&quot;Purpose&quot;</span>, <span class="stringliteral">&quot;Calling someone&quot;</span>)
);
</pre></div> 
</div>
</div>
<a class="anchor" id="a7d815dd443104fdf8f78c6fce6d83c55"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classtsip__session__invite.html#a7d815dd443104fdf8f78c6fce6d83c55">tsip_session_invite::dtmf</a> </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c_digit</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sends DTMF digit using SIP INFO. The session must be connected or in early-media state.<br/>
 Signature: dtmf(...set()) </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">c_digit</td><td>Digit to send </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>zero if succeed and non-zero otherwise</dd></dl>
<div class="fragment"><pre class="fragment"><span class="comment">// sends sharp digit</span>
o_session.dtmf(<span class="charliteral">&#39;#&#39;</span>);
</pre></div> 
</div>
</div>
<a class="anchor" id="adbbf5afe6c537d00058bff5a8e24b219"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">objectURL <a class="el" href="classtsip__session__invite.html#adbbf5afe6c537d00058bff5a8e24b219">tsip_session_invite::get_url_video_local</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the local video url </p>
<dl class="section return"><dt>Returns:</dt><dd>valid url object if succeed and null otherwise </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="classtsip__stack.html#a9b0aa5e2c48c1aaf3d44dbb7000f2ef8">tsip_stack::on_event_invite</a></dd></dl>
<div class="fragment"><pre class="fragment">o_stack.on_event_invite = <span class="keyword">function</span> (evt) {
     <span class="keywordflow">switch</span> (evt.e_invite_type) {
        <span class="keywordflow">case</span> tsip_event_invite_type_e.M_STREAM_VIDEO_LOCAL_ADDED:
                {
                    <span class="comment">// &#39;video_local&#39; is a HTML &lt;video&gt; element </span>
                    document.getElementById(<span class="stringliteral">&quot;video_local&quot;</span>).src = evt.get_session().get_url_video_local();
                    <span class="keywordflow">break</span>;
                }
     }
};
</pre></div> 
</div>
</div>
<a class="anchor" id="acc1077380a35ad17e3fed88fa2cbfcfa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">objectURL <a class="el" href="classtsip__session__invite.html#acc1077380a35ad17e3fed88fa2cbfcfa">tsip_session_invite::get_url_video_remote</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the remote video url </p>
<dl class="section return"><dt>Returns:</dt><dd>valid url object if succeed and null otherwise </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="classtsip__stack.html#a9b0aa5e2c48c1aaf3d44dbb7000f2ef8">tsip_stack::on_event_invite</a></dd></dl>
<div class="fragment"><pre class="fragment">o_stack.on_event_invite = <span class="keyword">function</span> (evt) {
    <span class="keywordflow">switch</span> (evt.e_invite_type) {
        <span class="keywordflow">case</span> tsip_event_invite_type_e.M_STREAM_VIDEO_REMOTE_ADDED:
            {
                <span class="comment">// &#39;video_remote&#39; is a HTML &lt;video&gt; element </span>
                document.getElementById(<span class="stringliteral">&quot;video_remote&quot;</span>).src = evt.get_session().get_url_video_local();
                <span class="keywordflow">break</span>;
            }
    }
};
</pre></div> 
</div>
</div>
<a class="anchor" id="ae4f1c4a18f2a2189906839ee458066a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classtsip__session__invite.html#ae4f1c4a18f2a2189906839ee458066a0">tsip_session_invite::hold</a> </td>
          <td>(</td>
          <td class="paramtype">tmedia_type_e&#160;</td>
          <td class="paramname"><em>e_media_type</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Puts the call in hold.<br/>
 The hold/resume state will be reported through <a class="el" href="classtsip__stack.html#a9b0aa5e2c48c1aaf3d44dbb7000f2ef8">tsip_stack::on_event_invite</a>.</p>
<p>Signature: hold(e_media_type, ...set()) </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">e_media_type</td><td>media type to hold. Should be the same media type used to make the call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>zero if succeed and non-zero otherwise </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="classtsip__session__invite.html#ac69f7ba9066a39841de862bc8b1aab7c">call()</a> <br/>
 <a class="el" href="classtsip__session__invite.html#abecaa4ce5c90c9e864346dea92463d07">resume()</a></dd></dl>
<div class="fragment"><pre class="fragment">o_session.hold(tmedia_type_e.AUDIO_VIDEO,
    <a class="code" href="classtsip__session.html">tsip_session</a>.prototype.<a class="code" href="classtsip__session.html#a827acf39b9d9cbb6a057e23af7b2c402">SetHeader</a>(<span class="stringliteral">&quot;Purpose&quot;</span>, <span class="stringliteral">&quot;Holding the call&quot;</span>)
);
</pre></div> 
</div>
</div>
<a class="anchor" id="ab412ae639f3f61e967ea0a5fbe92fd92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classtsip__session__invite.html#ab412ae639f3f61e967ea0a5fbe92fd92">tsip_session_invite::info</a> </td>
          <td>(</td>
          <td class="paramtype">Object&#160;</td>
          <td class="paramname"><em>o_content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>s_content_type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sends SIP INFO message. The session must be connected or in early-media state.<br/>
 Signature: info(o_content, s_content_type, ...set()) </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">o_content</td><td>Message content. Could be a String or ArrayBuffer </td></tr>
    <tr><td class="paramname">s_content_type</td><td>Message content type </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>zero if succeed and non-zero otherwise</dd></dl>
<div class="fragment"><pre class="fragment">o_session.info(<span class="stringliteral">&quot;Hello world!&quot;</span>, <span class="stringliteral">&quot;text/plain&quot;</span>);
</pre></div> 
</div>
</div>
<a class="anchor" id="abecaa4ce5c90c9e864346dea92463d07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classtsip__session__invite.html#abecaa4ce5c90c9e864346dea92463d07">tsip_session_invite::resume</a> </td>
          <td>(</td>
          <td class="paramtype">tmedia_type_e&#160;</td>
          <td class="paramname"><em>e_media_type</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Resumes the call.<br/>
 The hold/resume state will be reported through <a class="el" href="classtsip__stack.html#a9b0aa5e2c48c1aaf3d44dbb7000f2ef8">tsip_stack::on_event_invite</a>.</p>
<p>Signature: resume(e_media_type, ...set()) </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">e_media_type</td><td>media type to resume. Should be the same media type used to make the call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>zero if succeed and non-zero otherwise </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="classtsip__session__invite.html#ac69f7ba9066a39841de862bc8b1aab7c">call()</a> <br/>
 <a class="el" href="classtsip__session__invite.html#ae4f1c4a18f2a2189906839ee458066a0">hold()</a></dd></dl>
<div class="fragment"><pre class="fragment">o_session.resume(tmedia_type_e.AUDIO_VIDEO,
    <a class="code" href="classtsip__session.html">tsip_session</a>.prototype.<a class="code" href="classtsip__session.html#a827acf39b9d9cbb6a057e23af7b2c402">SetHeader</a>(<span class="stringliteral">&quot;Purpose&quot;</span>, <span class="stringliteral">&quot;Resuming the call&quot;</span>)
);
</pre></div> 
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/tinySIP/src/api/tsip_api_invite.cxx</li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Tue May 8 2012 01:55:56 for sipML5 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
